Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(google): fix autohealing health checks in deploy stages #6804

Merged
merged 1 commit into from
Apr 2, 2019

Conversation

maggieneterval
Copy link
Contributor

@maggieneterval maggieneterval commented Apr 2, 2019

Closes spinnaker/spinnaker#4221

We made the following fixes to Deck and Clouddriver to disambiguate health checks of the same name by also specifying the health check kind:
Deck: #6382
Clouddriver: spinnaker/clouddriver#3282

This fix worked by using the health check's URL as a unique ID, and extracting the health check's name and kind from the URL prior to submit. However, this only worked for ad-hoc create and clone operations, not the deploy stage, where the field is bound to the stage model. To resolve this, I added an onSelect handler to the health check dropdown that will update the health check's name and kind based on the selected health check URL. Confusingly, Deck receives a server group's autoHealingPolicy.healthCheck as the health check URL, but Clouddriver is expecting to receive a payload with autoHealingPolicy.healthCheck as the health check name, so to cover the two cases of building the command for stage editing (based on the stage model) and building the command for ad-hoc operations (based on what we receive from the server), we need to check if we have a healthCheckUrl field (only true for stages), and otherwise assume that the healthCheck is the URL.

Note that if users have worked around this bug by manually editing the deploy stage JSON such that healthCheck corresponds to the health check name rather than the URL, they can update these stages to work as expected by adding a healthCheckUrl field.

@maggieneterval maggieneterval requested review from jtk54 and a user April 2, 2019 15:34
Copy link
Contributor

@jtk54 jtk54 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@maggieneterval maggieneterval merged commit 0daec5b into spinnaker:master Apr 2, 2019
@maggieneterval
Copy link
Contributor Author

@spinnakerbot cherry-pick 1.13

@spinnakerbot
Copy link
Contributor

Cherry pick successful: #6805

kevinawoo pushed a commit to armory-io/deck that referenced this pull request Apr 5, 2019
kevinawoo added a commit to armory-io/deck that referenced this pull request Apr 8, 2019
* master: (28 commits)
  feat(kubernetes): feature-flagged support for kubernetes traffic management strategies (spinnaker#6816)
  feat(cf): Create Service Key pipeline stage (spinnaker#6821)
  feat(core): Create pipeline from v2 template list
  fix(provider/cf): Clone model so Orca monitors the correct foundation for up instances (spinnaker#6817)
  chore(kubernetes): refactor BasicSettings component to be usable in stages (spinnaker#6820)
  fix(triggers): Remove RunAsUser if pipeline permissions enabled for react triggers. (spinnaker#6818)
  feat(provider/azure): Add redblack strategy for azure (spinnaker#6801)
  fix(mptv2): clicking a view link on template list screen throws exception (spinnaker#6815)
  fix(artifacts): helm artifact, replace object assignw with object spread (spinnaker#6814)
  fix(provider/cf): Fix provider selection for resize stage in pipeline (spinnaker#6754)
  fix(artifacts): default helm artifact editor is broken (spinnaker#6811)
  fix(google): revert "select all zones by default when deploying a regional gce server group (spinnaker#6751)" (spinnaker#6808)
  fix(google): GCE create server group and load balancer fixes (spinnaker#6806)
  Bump package core to 0.0.350 and amazon to 0.0.184 (spinnaker#6807)
  fix(amazon): hide security groups on NLBs (spinnaker#6803)
  refactor(core): de-angularize ApplicationModelBuilder, fix project executions (spinnaker#6802)
  fix(google): fix autohealing health checks in deploy stages (spinnaker#6804)
  fix(kubernetes): show Deployment clusters in Find Artifacts from Resource stages (spinnaker#6794)
  fix(triggers): Add lastSuccessfulBuild as a build option in Jenkins default artifact (spinnaker#6797)
  fix(provider/cf): Make expected artifacts selectable as clone manifests (spinnaker#6796)
  ...
christopherthielen added a commit to christopherthielen/deck that referenced this pull request Jun 5, 2019
243f530 feat(provdier/google): Display serviceAccount properties for firewall rules (spinnaker#6929)
0a5fd58 refactor(*): remove cache-clearing calls that do not do anything (spinnaker#6861)
297cd99 feat(provider/google): Support Shielded VM policies (spinnaker#6849)
728ddbe fix(google): revert "select all zones by default when deploying a regional gce server group (spinnaker#6751)" (spinnaker#6808)
bdcbc97 fix(google): GCE create server group and load balancer fixes (spinnaker#6806)
72e164d refactor(core): de-angularize ApplicationModelBuilder, fix project executions (spinnaker#6802)
0daec5b fix(google): fix autohealing health checks in deploy stages (spinnaker#6804)
ad2e222 fix(google): select all zones by default when deploying a regional gce server group (spinnaker#6751)
432e6e3 fix(google): add better help text around accelerators (spinnaker#6750)
eb7f661 feat(provider/gce): Moniker support for GCE server groups (spinnaker#6317)
e2b4d8e refactor(*): remove unused local storage caches (spinnaker#6665)
f0f4c0d fix(google): Only show authorized accounts during Server group creation (spinnaker#6625)
d828a53 chore(angularjs): Explicitly annotate directive controllers
3e75815 refactor(core): migrate momentjs functionality to luxon + date-fns (spinnaker#6604)
7d5fc34 chore(prettier): Just Use Prettier™ (spinnaker#6600)
04bb4a0 fix(html): Fix various invalid HTML (spinnaker#6599)
64fb489 fix(html): Fix various invalid HTML (spinnaker#6597)
5cf6c79 chore(prettier): Just Use Prettier™
3ffa4fb chore(angularjs): Do not use .component('foo', new Foo())
cc52bee chore(angularjs): Remove all 'ngInject'; in favor of explicit DI annotation
b6bab1e chore(prettier): Just Use Prettier™
f3fd790 chore(angularjs): Explicitly annotate all AngularJS injection points
78d0b68 fix(securityGroups): User `securityGroupName` for upsertSecurityGroupTask (spinnaker#6569)
ddbe208 fix(eslint): Fix eslint warnings for no-useless-escape
8cba7ac fix(eslint): Fix eslint warnings for no-case-declarations
christopherthielen added a commit that referenced this pull request Jun 5, 2019
243f530 feat(provdier/google): Display serviceAccount properties for firewall rules (#6929)
0a5fd58 refactor(*): remove cache-clearing calls that do not do anything (#6861)
297cd99 feat(provider/google): Support Shielded VM policies (#6849)
728ddbe fix(google): revert "select all zones by default when deploying a regional gce server group (#6751)" (#6808)
bdcbc97 fix(google): GCE create server group and load balancer fixes (#6806)
72e164d refactor(core): de-angularize ApplicationModelBuilder, fix project executions (#6802)
0daec5b fix(google): fix autohealing health checks in deploy stages (#6804)
ad2e222 fix(google): select all zones by default when deploying a regional gce server group (#6751)
432e6e3 fix(google): add better help text around accelerators (#6750)
eb7f661 feat(provider/gce): Moniker support for GCE server groups (#6317)
e2b4d8e refactor(*): remove unused local storage caches (#6665)
f0f4c0d fix(google): Only show authorized accounts during Server group creation (#6625)
d828a53 chore(angularjs): Explicitly annotate directive controllers
3e75815 refactor(core): migrate momentjs functionality to luxon + date-fns (#6604)
7d5fc34 chore(prettier): Just Use Prettier™ (#6600)
04bb4a0 fix(html): Fix various invalid HTML (#6599)
64fb489 fix(html): Fix various invalid HTML (#6597)
5cf6c79 chore(prettier): Just Use Prettier™
3ffa4fb chore(angularjs): Do not use .component('foo', new Foo())
cc52bee chore(angularjs): Remove all 'ngInject'; in favor of explicit DI annotation
b6bab1e chore(prettier): Just Use Prettier™
f3fd790 chore(angularjs): Explicitly annotate all AngularJS injection points
78d0b68 fix(securityGroups): User `securityGroupName` for upsertSecurityGroupTask (#6569)
ddbe208 fix(eslint): Fix eslint warnings for no-useless-escape
8cba7ac fix(eslint): Fix eslint warnings for no-case-declarations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

autoHealingPolicy : healthCheck is adding with full url instaed of only healthcheck name in pipeline json
3 participants